<include file="public:header" />
<div class="toptip">
  <h2>提示：</h2>
  <p>若设置了伪静态，同时请在服务器伪静态规则文件中增加对应规则。</p>
</div>
<div class="toptit">基础设置</div>
  <form action="{:U('add')}" method="post"   name="form1" id="form1">
    <table width="100%" border="0" cellspacing="0" cellpadding="4" class="link_lan">
      <tr>
        <td style=" line-height:220%; color:#666666;"><table width="700" border="0" cellspacing="5" cellpadding="1" style=" margin-bottom:3px;">
            <tr>
              <td width="150" align="right">页面类型：</td>
              <td> 自定义页面</td>
            </tr>
            <tr>
              <td width="150" align="right">调用ID：</td>
              <td><input name="alias" type="text"  class="input_text_200" id="alias" value="" maxlength="30">
        自定义页面调用名称不可以用 "QS_" 开头
        </td>
            </tr>
            <tr>
              <td width="150" align="right">页面名称：</td>
              <td><input name="pname" type="text"  class="input_text_200" id="title" value="" maxlength="60"></td>
            </tr>
            <tr>
              <td width="150" align="right">导航关联标记：</td>
              <td><input name="tag" type="text"  class="input_text_200" id="tag" value="" maxlength="60"></td>
            </tr>
            <tr>
              <td align="right">链接优化：</td>
              <td><table border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="120"><label >
                      <input name="url" type="radio" value="0" checked="checked"  />
                      原始链接 </label></td>
                    
                    <td><label >
                      <input type="radio" name="url" value="1"  />
                      伪静态</label></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td align="right">页面类型：</td>
              <td><table border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="120"><label >
                      <input name="pagetpye" type="radio" value="1" checked="checked"  onclick="show_seo('seo');"/>
                      首页或频道首页 </label></td>
                    <td width="120"><label >
                      <input type="radio" name="pagetpye" value="2"    onclick="show_seo('seo');"/>
                      信息列表页 </label>
                    </td>
                    <td><label >
                      <input type="radio" name="pagetpye" value="3"   onclick="show_seo('seo');" />
                      信息内容页</label></td>
                  </tr>
              </table></td>
            </tr>
            <if condition="$apply['Subsite']">
            <tr>
              <td align="right">添加在：</td>
              <td colspan="4">
                <qscms:subsite 列表名="subsite_list"/>
                <if condition="$visitor['role_id'] eq 1">
                  <volist name="subsite_list" id="subsite">
                    <label style="color: rgb(102, 102, 102);">
                      <input name="subsite_id[]" type="checkbox" value="{$subsite.s_id}" <if condition="$i eq 1">checked="checked"</if>>{$subsite.s_sitename}
                    </label>&nbsp;&nbsp;&nbsp;
                  </volist>
                <else/>
                  <volist name="subsite_list" id="subsite">
                    <if condition="in_array($subsite['s_id'],$visitor['subsite'])">
                      <label style="color: rgb(102, 102, 102);">
                        <input name="subsite_id[]" type="checkbox" value="{$subsite.s_id}">{$subsite.s_sitename}
                      </label>&nbsp;&nbsp;&nbsp;
                    </if>
                  </volist>
                </if>
             </td>
            </tr>
          </if>
        </table></td>
      </tr>
    </table>
    <div class="toptit">页面设置</div>
    <table width="100%" border="0" cellspacing="0" cellpadding="4" class="link_lan">
      <tr>
        <td  ><table width="700" border="0" cellspacing="5" cellpadding="1" style=" margin-bottom:3px;">
            <tr>
              <td width="150" align="right">模块：</td>
              <td width="210"><input name="module" type="text"  class="input_text_200" id="module" value="" /></td>
              <td><span style="color:#666666">(模块开头字母要大写)</span>&nbsp;</td>
            </tr>
            <tr>
              <td width="150" align="right">控制器：</td>
              <td width="210"><input name="controller" type="text"  class="input_text_200" id="controller" value="" /></td>
              <td><span style="color:#666666">(控制器开头字母要大写)</span>&nbsp;</td>
            </tr>
            <tr>
              <td width="150" align="right">方法：</td>
              <td width="210"><input name="action" type="text"  class="input_text_200" id="action" value="" /></td>
            </tr>
            <!--<tr>
              <td width="150" align="right">伪静态规则：</td>
              <td><input name="rewrite" type="text"  class="input_text_200" id="rewrite" value=""/></td>
              <td><span style="color:#666666">(增加后请在服务器伪静态配置文件增加对应规则)</span>&nbsp;</td>
            </tr>-->
            <tr>
              <td align="right"><a  href="javascript:isdisplay('caching_help')" >(?)</a>&nbsp;&nbsp;缓存时间：</td>
              <td><input name="caching" type="text"  class="input_text_200" id="caching" value="0" maxlength="30"/></td>
              <td>分钟 <span style="color:#666666">(0为不缓存) </span></td>
            </tr>
          </table>
            <table width="100%" border="0" cellpadding="0" style="line-height:180%; padding-left:15px; display:none" id="caching_help">
              <tr>
                <td><span style="color:#666666"> <strong style="color:#003399">缓存说明</strong><br />
                  缓存是当查询数据时，会把结果序列化后保存到文件中，以后同样的查询就不用查询数据库，而是从缓存中获得。这一改进使得程序速度得以太幅度提升。<br />
                  缓存时间是缓存重新加载周期，周期越长，数据库的负荷越小，缓存周期假设为50秒，则每50秒刷新缓存一次。</span><br /></td>
              </tr>
            </table>
        </td>
      </tr>
    </table>
  <div id="seo">
  <div class="toptit">搜索引擎优化(SEO)</div>
    <table width="100%" border="0" cellspacing="0" cellpadding="4" class="link_lan">
  
      <tr>
        <td style=" line-height:220%; color:#666666;"><table width="700" border="0" cellspacing="5" cellpadding="1" style=" margin-bottom:3px;">
    <tr>
              <td width="150" align="right">可用标签：</td>
              <td>
          <div id="{site_name}" class="sellabel">网站名称</div>
        <div id="{site_domain}" class="sellabel">网站域名</div>
        <div class="clear"></div>
        </td>
            </tr>
            <tr>
              <td width="150" align="right">title：</td>
              <td><input name="title" type="text"  class="input_text_400" id="labtitle" value="" /></td>
            </tr>
            <tr>
              <td width="150" align="right">keywords：</td>
              <td><textarea name="keywords" class="input_text_400" id="labkeywords" style="height:60px;"></textarea></td>
            </tr>
            <tr>
              <td width="150" align="right">description：</td>
              <td><textarea name="description" class="input_text_400" id="labdescription" style="height:60px;"></textarea></td>
            </tr>
        </table></td>
      </tr>
    </table>
  </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="4" class="link_lan">
      <tr>
        <td height="80"  style=" padding-left:170px;"  >
    <input type="submit" name="Submi1t2" value="添加" class="admin_submit"   />
 
          <input name="submit222" type="button" class="admin_submit"    value="返 回" onclick="window.location='{:U('page/index')}'"/>
        </td>
      </tr>
    </table>
  
  </form>
</div>
<include file="public:footer" />
<script type="text/javascript" src="__ADMINPUBLIC__/js/jquery.caretInsert.js"></script>
<script language="JavaScript" type="text/javascript"> 
//获取单选的值
function radios_val(val)
{
    var radios=document.getElementsByName(val);
    for(var i=0;i<radios.length;i++)
    {
        if(radios[i].checked==true)
        {
  return radios[i].value;
        break;
        }
    }
}
show_seo("seo");
function show_seo(showid)
{
var caching_val=radios_val("pagetpye");
if (caching_val=="1")
{
 document.getElementById(showid).style.display="";   
}
else
{
document.getElementById(showid).style.display="none";   
}
}
function isdisplay(i)     
{      
if(document.getElementById(i).style.display=="")     
{     
 document.getElementById(i).style.display="none";     
}     
else     
{     
document.getElementById(i).style.display="";     
  
}     
 }
(function($)
{
  $(".sellabel").hover(function(){$(this).css("background-color","#ffffff");},function()  {$(this).css("background-color","#F4FAFF");});
  $("#labtitle").unbind().focus(function() {
    $('#labtitle').setCaret();
     $('.sellabel').unbind("click").click(function(){ 
       $('#labtitle').insertAtCaret($(this).attr("id"));
     });
  });
  $("#labkeywords").unbind().focus(function() {
    $('#labkeywords').setCaret();
     $('.sellabel').unbind("click").click(function(){ 
       $('#labkeywords').insertAtCaret($(this).attr("id"));
     });
  });
  $("#labdescription").unbind().focus(function() {
    $('#labdescription').setCaret();
     $('.sellabel').unbind("click").click(function(){ 
       $('#labdescription').insertAtCaret($(this).attr("id"));
     });
  }); 
})($);   
</script>
</body>
</html>